<style scoped>
    .my-th{
      width:10vw;
      padding-left:10px;
    }

    .my-td{
      width:15vw;
      padding-left:10px;
    }
</style>
<template>
    <div style="background-color: #ffffff;padding: 20px 50px;">
        <table border="1px" class="tale" align="center" style="width:100%;">
            <tr align="center" style="height: 3vw">
                <th class="my-th">项目名字</th>
                <td class="my-td">{{ row.project }}</td>
                <th class="my-th">开始时间</th>
                <td class="my-td">{{ changeDate(row.create_time) }}</td>
                <th class="my-th">结束时间</th>
                <td class="my-td">{{ changeDate(row.end_time) }}</td>
            </tr>
            <tr align="center" style="height: 3vw">
                <th class="my-th">所属租户</th>
                <td class="my-td">{{ row.tenant_name }}</td>
                <th class="my-th">周期</th>
                <td class="my-td">{{ row.cycle }}</td>
                <th class="my-th">是否签订合同</th>
                <td class="my-td">{{ row.isContract  }}</td>
            </tr>
            <tr align="center" style="height: 3vw">
                <th class="my-th">入驻位置</th>
                <td class="my-td">{{ row.position }}</td>
                <th class="my-th">项目类型</th>
                <td class="my-td">{{ row.projectType }}</td>
                <template v-if="row.businessId != null && row.businessId != undefined && row.businessId >0">
                    <th class="my-th">项目运营人员</th>
                    <td class="my-td" >{{ row.business }}</td>
                </template>
                <template v-else>
                    <th class="my-th">租户运营人员</th>
                    <td class="my-td">{{ row.tenant_business }}</td>
                </template>
            </tr>
            <tr align="center" style="height: 3vw">
                <th class="my-th">项目经理</th>
                <td class="my-td">{{ row.manager }}</td>
                <th class="my-th">项目经理联系方式</th>
                <td class="my-td">{{ row.manager_phone }}</td>
                <template v-if="row.isWithDraw === '0'">
                    <th class="my-th">状态</th>
                    <td class="my-td">正常</td>
                </template>
                <template v-if="row.isWithDraw === '1'">
                    <th class="my-th">销户时间</th>
                    <td class="my-td">{{ changeDate(row.withDrawTime) }}</td>
                </template>
            </tr>
            <tr align="center" style="height: 3vw">
                <th class="my-th">是否为梧桐租户</th>
                <td class="my-td" v-if="row.isWTtenant == 1">是</td>
                <td class="my-td" v-else>否</td>
                <th class="my-th">租户唯一标识</th>
                <td class="my-td">{{ row.uniqueId }}</td>
                <th class="my-th"></th>
                <td class="my-td"></td>
            </tr>
            <tr align="center" style="height: 3vw">
                <th class="my-th">关联用户</th>
                <td class="my-td" colspan="5">
                    <template v-for="(item,index) in row.users">
                        <span>{{item.user_name}}</span>
                        <span v-if="index != (row.users.length-1)">、</span>
                        <span v-else></span>
                    </template>
                </td>
            </tr>
            <tr align="center" style="height: 3vw">
                <th class="my-th">项目详情</th>
                <td class="my-td" colspan="5">{{ row.des }}</td>
            </tr>
        </table>
    </div>
</template>
<script>
    export default {
        mounted() {
            console.log("-----row----",this.row);
        },
        methods:{
            changeDate(time){
                return this.utils.formatDate(new Date(time*1000), "yyyy-MM-dd");
            }
        },
        props: {
            row: Object
        }
    };
</script>